home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
qwik30.arc
/
QINIT.DOC
< prev
next >
Wrap
Text File
|
1991-01-09
|
12KB
|
238 lines
{ Qinit.doc - documentation for Qinit.inc ver 3.0, 08-31-87 }
This file will help you figure out how the new IBM PS/2 systems are config-
ured as well as original equipment. First, it is helpful to have a list of
all the possible Alphanumeric (A/N or text) modes. QWIK was not designed
for the All Points Addressable (APA or graphics) modes.
TABLE 1: Hardware Specific Video Mode Characteristics
Mode Format Segment Display Box MDA CGA EGA MCGA VGA PCjr PCC MaxPage
---- ------ ------- ------- ---- --- --- --- ---- --- ---- --- -------
0,1 40x25 B800:0 320x200 8x8 x x x x x x 7
320x350 8x14 x x 7
320x400 8x16 x 7
360x400 9x16 x 7
2,3 80x25 B800:0 640x200 8x8 x x x 3
640x200 8x8 x x 7 *
640x350 8x14 x x 7 *
640x400 8x16 x 7
720x400 9x16 x 7
7 80x25 B000:0 720x350 9x14 x x 0
720x350 9x14 x x 7 *
720x400 9x16 x 7
640x200 8x8 x 3
Legend:
Format - Characters per row by the number of rows in the data area.
Segment - Address of the first character on page 0 of the display buffer.
Display - The pixel resolution for the data area excluding the border,
horizontal by vertical.
Box - The pixel resolution for each character, horizontal by vertical.
MDA - Monochrome Display and Printer Adapter
CGA - Color Graphics Adapter
EGA - Enhanced Graphics Adapter
PGC - Professional Graphics Controller
MCGA - Multi-Color Graphics Array
VGA - Video Graphics Array
PCjr - PC Junior
PCC - PC Convertible
MaxPage - 0-based highest page number; e.g. 7 means there are 8 pages.
MD - 5151 Monochrome Display
CD - 5153 Color Display
ECD - 5154 Enhanced Color Display
Notes:
1. The 0 and 2 modes suppress color burst only on composite displays (not
RGB) only for CGA and EGA.
2. The PS/2 model 25 and 30 have an integrated MCGA. The model 50 and
above have an integrated VGA.
3. The 8514 High Content Color Display along with the 8514/A adapter
produces a superset of the VGA for APA, but there is no differences in
the A/N modes to the VGA when the adapter is in "VGA" mode. See IBM
documentation for Advanced Function Mode.
4. Reduce MaxPage to 3 if EGA only has 64K graphics memory installed for
modes marked "*". MaxPage of 7 is for 128K or more.
5. The PCC can have either an alternate MDA or CGA. The LCD (model 5140)
can emulate either the MDA or CGA modes, but the MDA mode is 640x200.
6. I currently have no information on the PGC.
7. To relieve cursor routine programming due to the multiple character box
sizes, the VGA has a cursor emulation mode. Qinit turns on the mode
if PS/2 equipment is detected. See CURSOR.DOC for emulation notes.
Display Combination Code (DCC) - The PS/2 video BIOS has a new function
that simplifies equipment detection called the Read/Write Display
Combination Code. Using interrupt $10 with AH = $1A00, the call will
return the Active Display Device in BL and the Alternate Display Device in
BH. If the function is supported, it also returns $1A to AL. The possible
Display Device codes are:
TABLE 2: Display Combination Code
CODE DESCRIPTION QWIK30 Constant
---- -------------------------------- ---------------
$00 - No display NoDisplay
$01 - MDA with 5151 monochrome display MdaMono
$02 - CGA with 5153/4 color display CgaColor
$03 - reserved DCC3
$04 - EGA with 5153/4 color EgaColor
$05 - EGA with 5151 monochrome EgaMono
$06 - PGC with 5175 color PgcColor
$07 - VGA with analog monochrome VgaMono
$08 - VGA with analog color VgaColor
$09 to $0A - reserved DCC9,DCC10
$0B - MCGA with analog monochrome McgaMono
$0C - MCGA with analog color McgaColor
$0D to $FE - reserved n/a
$FF - unknown Unknown
HavePS2 - Qinit sets HavePS2 to true if the DCC is supported. This means
that the program has detected some kind of PS/2 equipment whether it is a
standard Model 30, a PS/2 Display Adapter on an IBM XT, or the like. It
also means that either MCGA or VGA is present, but not necessarily
active. To know which, just check the DCC.
Conforming to DCC - No results are obtained for the DCC on anything other
than PS/2 equipment. However, to be consistent, Qinit was reprogrammed
to conform to the DCC for ALL equipment. To see if a CGA is in use,
simply check to see if ActiveDD=CgaColor. Qinit only sets the parameters
for the active display. Although the alternate code is saved, it is only
for testing purposes. If you change text modes in a running program,
Qinit should be executed again.
EGA Switches - By checking the value of this byte, you can determine the
monitor connected to the EGA, the alternate video system, and the start
up default. The byte is a copy of how the dip switches are set on the
card where on=0 and off=1. The primary is the default. When the ECD is
set for 640x200, it is emulating the CD including the cursor mode.
TABLE 3: EGA dip switch configuration
SWITCH VALUE PRIMARY SECONDARY
------ ----- -------------------- -------------------
0000 0 MDA + MD EGA + CD - 40x25
0001 1 MDA + MD EGA + CD - 80x25
0010 2 MDA + MD EGA + ECD (640x200)
0011 3 MDA + MD EGA + ECD (640x350)
0100 4 CGA + CD - 40x25 EGA + MD
0101 5 CGA + CD - 80x25 EGA + MD
0110 6 EGA + CD - 40x25 MDA + MD
0111 7 EGA + CD - 80x25 MDA + MD
1000 8 EGA + ECD (640x200) MDA + MD
1001 9 EGA + ECD (640x350) MDA + MD
1010 10 EGA + MD CGA + CD - 40x25
1011 11 EGA + MD CGA + CD - 80x25
EGA Information - The byte located at $0040:$0087 has the following
information when the EGA (or VGA) is present:
TABLE 4: EGA information
BITS DESCRIPTION
---- -------------------------------------------------
7 (0) Clear, (1) Keep video data after mode set
6,5 (00) 64k, (01) 128k, (10) 192k, (11) 256k, memory
4 Reserved
3 (0) EGA active, (1) EGA not active
2 (0) Disable, (1) Enable wait-for-display
1 (0) CD/ECD, (1) MD attached
0 (0) Active, (1) Inactive CD emulation
PCC Exceptions - Since the PCC also does not support the DCC, a little
hedging is done. If the 5140 LCD is used in mode 7, the Active Display
Device is set to MdaMono which is close enough. This set up can be
verified by testing if MaxPage=3. The alternate display is found by using
interrupt $10 with AH=$15. The result is saved in PCCAltDD. Of course
the variable is undefined if a PCC is not used. The possible types are:
TABLE 5: PC Convertible Alternate Display Adapters
VARIABLE MODEL DESCRIPTION
-------- ----- --------------------
PCCAltDD = $ 0 - No alternate adapter
= $5140 - LCD
= $5153 - CGA type
= $5151 - Monochrome type
System Identification - To get both the model and submodel, you must use
interrupt $15 with AH=$C0 which only works on some computers. If the
carry flag is set on exit, then that interrupt is not supported, because
there's no submodel number. The alternative is to get the basic computer
model by directly accessing the byte in memory at $F000:$FFFE. The
possible values are:
TABLE 6: System Identification Codes
SysID Sub-Model SYSTEM
----- --------- ---------------------------
$FF n/a IBM PC
$FE n/a IBM PC XT
$FD n/a IBM PCjr
$FC n/a IBM PC AT (6 MHz, 01/10/84)
$00 IBM PC AT (6 MHz, 06/10/85)
$01 IBM PC AT (8 MHz, 11/15/85)
$02 IBM PC XT (286)
$04 IBM PS/2 model 50
$05 IBM PS/2 model 60
$FB $00 IBM PC XT (256/640)
$FA $00 IBM PS/2 model 30
$01 IBM PS/2 model 25
$F9 $00 IBM PC Convertible
$F8 $00 IBM PS/2 model 80 (16 MHz)
$01 IBM PS/2 model 80 (20 MHz)
? IBM PS/2 model 70
The essential variables set by Qinit are:
VARIABLE DESCRIPTION
------------ ---------------------------------------------------------
Page0seg Segment for the base page, page 0.
Qseg Segment for Q writing which is altered when changing
pages.
Qwait Wait-for-retrace while Q writing.
MaxPage Maximum possible 0-based page number.
The other variables set or located by Qinit are for your reference to
help make decisions in your programs:
VARIABLE DESCRIPTION
------------ ---------------------------------------------------------
Vmode Directly accesses the video mode code.
EgaRows 0-based number of rows on the screen for EGA or VGA.
EgaFontSize 1-based number of horizontal scan lines per character for
EGA or VGA.
EgaInfo (Described above)
EgaSwithces (Described above)
CRTcolumns 1-based number of columns on the screen for any card.
HavePS2 Detects the presence of some type of IBM PS/2 equipment.
CardWait Requirement for wait-for-retrace for the video "card".
SystemID Code for the IBM computer in use.
SubModelID Code for the sub-model of the IBM computer in use.
ActiveDD Code for the Active Display Device.
AltDD Code for the Alternate Display Device.
PCCAltDD Code for the Alternate Display adapter on the PC
Convertible.
A recent discovery has shown that CGA cards do not need wait-for-retrace
in 40 column modes 0 and 1. Qinit was programmed to accommodate this.
For other hardware, you can change Qwait to suit your needs, but CardWait
should be left unchanged to save what Qinit detected.
References - For more information on the new IBM PS/2 system, you can get
the "IBM BIOS Interface Technical Reference Manual". Other references
include:
IBM Personal System/2 Seminar Proceedings:
Volume 5, Number 2, Displays and Adapters, publication # G360-2678.
Volume 5, Number 4, Models 50, 60, 80, VGA, BIOS and Programming
Considerations, publication # G360-2747.
As always, the above information is subject to change without notice per
IBM.
IBM is the trademark for International Business Machines Corp. (but you
already know that!)